package com.example.lzy.viewpagerandfragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.example.lzy.viewpagerandfragment.R;

/**
 * Created by lzy on 2018/4/11.
 */

public class MainTab01 extends BaseFragment {



    @Override
    protected int getResourceLayout() {
        return R.layout.main_tab_01;
    }

    @Override
    protected void initView(View rootView, Bundle savedInstanceState) {

        ((TextView)rootView.findViewById(R.id.titletext)).setText("微信");
        rootView.findViewById(R.id.wx_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent i = new Intent(getContext(),Main2Activity.class);
                startActivity(i);

            }
        });
    }


}
